@import 'scss-styles/vars.scss';
@import '../common.scss';

$content-font-size: 1rem;

@mixin center-layout {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

.content {
  padding: 1rem 0;
  font-size: $content-font-size;
}

.detail {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0;
  color: $white;
  font-size: $content-font-size;
}

.art {
  &>* {
    @include content-limit();
  }

  .artContent {

    .artCover {
      position: relative;
      width: 100%;
      padding-bottom: 62%;  // Set the height of elem to `width * 62%`
      border-radius: $border-radius-tiny;
      overflow: hidden;

      img {
        width: 102%;
        position: absolute;
        top: -12%;
        left: -1%;
      }
    }

    .artDetail {
    }
  }
}

.music {

  .musicContent {

    .musicSlides {
      height: 60vw;
      // padding-bottom: 2rem;

      .slideItem {
        position: relative;
        overflow-x: hidden;
        @include center-layout();
        transition: transform .3s ease-in-out;

        img {
          height: 100%;
          flex-shrink: 0;
        }

        .slideShadow {
          position: absolute;
          top: 0;
          bottom: 0;
          left: 0;
          right: 0;
          background-color: rgba(0, 0, 0, .4);
          transition: background-color .3s ease-in-out;
        }
      }

      :global(.asf-carousel-active) {
        .slideShadow {
          position: absolute;
          top: 0;
          bottom: 0;
          left: 0;
          right: 0;
          background-color: rgba(255, 255, 255, .4);
          display: flex;
          align-items: center;
          justify-content: center;

          .playButton {
            height: 25%;
            width: 25%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
            animation: fade-in .3s;

            & div {
              height: 100%;
              width: 35%;
              background-color: $positive-color;
            }
          }
        }

        .songName {
          position: absolute;
          bottom: -1rem;
          color: $white;
          left: 50%;
          transform: translateX(-50%);
          z-index: 1000;
        }
      }
    }

    .musicDetail {
      @include content-limit();
    }
  }

  .musicFoot {
    @include content-limit();
  }
}

@keyframes fade-in {
  from { opacity: 0 }
  to { opacity: 1 }
}

.store {
  .storeContent {
    padding-bottom: 0;

    .storeDetail {
      @include content-limit();
    }
  }

  .storeCover {
    .storeItems {
      @include center-layout();
      background-color: $white;

      li {
        position: relative;
        width: 40vw;
        height: 40vw;
        overflow-x: hidden;
        flex-grow: 0;
        flex-shrink: 0;
        @include center-layout();
      }

      .storeItemCover {

        img {
          height: 90%;
        }
      }

      .storeItemLink {
        color: $white;
        font-size: 7vw;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;

        img {
          width: 40%;
          margin-top: -20%;
        }

        &:hover {
          cursor: pointer;
        }
      }

      &:nth-child(1) {
        .storeItemLink {
          background-color: $bella;
        }
      }

      &:nth-child(2) {
        padding-left: 35%;

        .storeItemLink {
          &:nth-child(1) {
            background-color: $ava;

            img {
              transform: rotate3d(0, 1, 0, .5turn);
            }
          }

          &:nth-child(3) {
            background-color: $carol;
          }
        }
      }
    }
  }
}

.qa {
  &>* {
    @include content-limit();
  }

  .qaCover {
    position: relative;
    padding-bottom: $content-font-size * 1.2;

    img {
      width: 100%;
    }

    p {
      position: absolute;
      bottom: 0;
      right: 0;
      font-weight: bold;
    }
  }
}
